package h_eekwan.service;

import java.sql.Connection;
import java.sql.PreparedStatement;

import h_eekwan.interfaces.P_ProfessorService;
import h_eekwan.module.P_Professor;

public class P_ProfessorDBA implements P_ProfessorService {
	// JDBC 접속
		private static final String DRV ="oracle.jdbc.OracleDriver";
		private static final String URL = "jdbc:oracle:thin:@//localhost:1521/xe";
		private static final String USR = "scott";
		private static final String PWD = "TIGER";
		// SQL문 작성
		
		private static final String insertSQL = 
				" insert into P_Professor(no, name, age, addr, sal, rank, speciality, regdate) values(prno.nextval, ?, ?, ?, ?, ?, ?, sysdate) ";
		private static final String selectSQL = 
				" select no, name, depart, sjno from P_Professor ";
		private static final String selectOneSQL = 
				" select * from P_Professor where no = ? ";			// 상세 전체조회
		private static final String updateSQL = 
				" update P_Professor set name = ?, age = ?, addr = ?, sal = ?, rank = ?, specialiry = ? , regdate = sysdate where no = ? ";
		private static final String deleteSQL = 
				" delete from P_Professor where no = ? ";
	
	
	@Override
	public int insertProfessor(P_Professor pvo) {
		Connection conn = null;
		PreparedStatement ps = null;
		int cnt = 0;
		
		try{
			
		}catch(Exception ex){
			ex.printStackTrace();
		}finally{
			
		}
		
		return cnt;
		
	}

	@Override
	public String selectProfessor() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String selectProfessor(String id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int updateProfessor(P_Professor pvo) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteProfessor(String id) {
		// TODO Auto-generated method stub
		return 0;
	}

}
